package com.opesoft.fw.i18n.taglib;

import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.Tag;
import org.apache.log4j.Logger;


public class Msg extends Base
{
	Logger log=Logger.getLogger(this.getClass());

	protected String name;

public int doEndTag() throws JspException
	{
		if(name!=null)
		{
			try
			{
				this.pageContext.getOut().print(this.findI18nMessage(this.name));
			}
			catch(IOException e)
			{
				e.printStackTrace();
			}
		}

		this.name=null;
		return Tag.EVAL_PAGE;
	}	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name=name;
	}

}
